package com.example.demo.web.param;

import com.example.demo.sys.service.bo.UserBO;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class SaveUserRequest {
    @NotNull
    private String username;
    @NotNull
    private String password;
    private Long id;
    private Long pid;

    public UserBO bo() {
        UserBO userBO = new UserBO();
        BeanUtils.copyProperties(this, userBO);
        return userBO;
    }
}
